<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <!-- 理想视口的标准的写法 -->
  <meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1,minimum-scale=1,user-scalable=no">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>省钱控</title>
    <link rel="stylesheet" href="../css/base.css ">
    <link rel="stylesheet" href="../lib/assets/css/amazeui.css">
    <link rel="stylesheet" href="../css/public.css">
    <link rel="stylesheet" href="../css/save_money.css">

</head>
<body>
    <!-- 头部 -->
    <header>
        <a href="../index.html" class="header_logo ">
          <div></div>
        </a>
        <span>省钱控·最新优惠</span>
        <a href="#" class="header_app">
            <img src="../images/header_app.png" alt="">
        </a>
    </header>
    <!-- 搜索框 --> 
    <div class="search">
        <input type="text" class="search_text" placeholder="请输入你想比价的商品">
        <input type="button" class="search_btn" value="搜索">
    </div> 
    <!-- 商品推荐列表 -->
    <div class="sptj_all">
        <div class="sptj_list">
         <ul class="sptj_list_ul">

         </ul>
        </div>
     </div>


    <!-- 分页功能 -->
    <ul data-am-widget="pagination" class="am-pagination am-pagination-default">
        <li class="am-pagination-first ">
            <a href="#" class="">第一页</a>
        </li>
        <li class="am-pagination-prev ">
            <a href="#" class="">上一页</a>
        </li>
        <li class="">
            <a href="#" class="">1</a>
        </li>
        <li class="am-active">
            <a href="#" class="am-active">2</a>
        </li>
        <li class="">
            <a href="#" class="">3</a>
        </li>
        <li class="">
            <a href="#" class="">4</a>
        </li>
        <li class="am-pagination-next ">
            <a href="#" class="">下一页</a>
        </li>
        <li class="am-pagination-last ">
            <a href="#" class="">最末页</a>
        </li>
    </ul>
    <!-- 底部 -->
    <div class="foot_mod">
            <div class="foot_top">
                <a href="#">登录</a> <a href="#">注册</a> 
                <a href="#top" style="width: 40%; border: 0;">
                <img src="http://www.zuyushop.com/wap/images/top.jpg" width="15" height="15">返回顶部</a>
            </div>
        <div class="footer">
            <p>
                <a href="#">手机app下载</a>
                <a href="#">慢慢买手机版</a>
                --  掌上比价平台
            </p>
            <p>
                m.manmanbuy.com
            </p>
        </div>
    </div>
    <!-- 返回顶部 -->
    <div data-am-widget="gotop" class="am-gotop am-gotop-default" >
        <a href="#top" title="回到顶部">
            <span class="am-gotop-title">回到顶部</span>
              <i class="am-gotop-icon am-icon-chevron-up"></i>
        </a>
      </div>
</body>
</html>
<script src="../lib/assets/js/amazeui.js"></script>
<!-- zepto -->
<script src="../lib/zepto/zepto.js"></script>
<!-- JQ 文件 -->
<script src="../lib/jquery-1.12.2.min.js"></script>
<!-- 模板引擎 -->
<script src="../lib/arttemplate/template-web.js"></script>
<!-- 模板 -->
<script id="productId" type="text/html">
    {{each arr val index }}
    <li class="clearfix ui-border-b">
        <a href="../pages/product_info.html?productid={{val.productId}}">
          <div class="pic">
                {{@ val.productImg2}}
          </div>
          <div class="clearfix info">
            <div class="title">{{val.productName}} 
              <span>{{val.productPinkage}}</span>
            </div>
            <div class="other">
              <span class="mall">{{val.productFrom}} | {{val.productTime}}</span>
              <span class="comment">
                <i class="icon-comment"></i>{{val.productComCount}}
              </span>
            </div>
          </div>
        </a>
      </li>
  {{/each}}
</script>
<!-- 模板渲染 -->
<script>
    $.get("http://193.112.55.79:9090/api/getmoneyctrl",function(res){
        console.log(res.result)
        var html=template("productId",{arr:res.result});
        $(".sptj_list_ul").html(html);
    })
</script>